package swa2.icecream.factory;

import swa2.icecream.GreekIceCream;
import swa2.icecream.IceCream;
import swa2.icecream.decorator.GreekCherrySauce;
import swa2.icecream.decorator.GreekChocolateDip;

public class GreekIceCreamFactory extends AbstractIceCreamFactory
{
	@Override
	public void createIceCream()
	{
		if(icecream != null)
			return;
		
		IceCream ic = new GreekIceCream();
		
		for(; chocolate > 0; chocolate--)
			ic = new GreekChocolateDip(ic);
		
		for(; cherry > 0; cherry--)
			ic = new GreekCherrySauce(ic);
		
		icecream = ic;
	}
}

